<!-- HTML header for doxygen 1.8.10-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="generator" content="Doxygen 1.8.10" />
    <title>ZRDDS: DDSIF接口 参考</title>
    <link href="tabs.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript" src="dynsections.js"></script>
    <link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
    <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
    <link href="doxygen.css" rel="stylesheet" type="text/css" />
    <link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
    <link href="static/css/bootstrap.css" rel="stylesheet" />
    <!-- <link href="static/css/sticky-footer-navbar.css" rel="stylesheet">
    <script type="text/javascript" src="static/js/bootstrap.js"></script> -->
    <script type="text/javascript" src="static/js/doxy-boot.js"></script>
</head>
<body>
    <div id="top">
        <!-- do not remove this div, it is closed by doxygen! -->
        <!-- end header part --><!-- 制作者 Doxygen 1.8.10 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>首页</span></a></li>
      <li><a href="pages.html"><span>相关页面</span></a></li>
      <li><a href="namespaces.html"><span>包</span></a></li>
      <li class="current"><a href="annotated.html"><span>类</span></a></li>
      <li><a href="examples.html"><span>示例</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="搜索" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>类列表</span></a></li>
      <li><a href="classes.html"><span>类索引</span></a></li>
      <li><a href="hierarchy.html"><span>类继承关系</span></a></li>
      <li><a href="functions.html"><span>类成员</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classcom_1_1zrdds_1_1simpleinterface_1_1_d_d_s_i_f.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-static-methods">静态 Public 成员函数</a> &#124;
<a href="interfacecom_1_1zrdds_1_1simpleinterface_1_1_d_d_s_i_f-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">DDSIF接口 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>DDS的Java简化接口，所有方法为静态方法。  
 <a href="classcom_1_1zrdds_1_1simpleinterface_1_1_d_d_s_i_f.html#details">更多...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
静态 Public 成员函数</h2></td></tr>
<tr class="memitem:a087adf3b92e9f3942ae6f40bfc6c1ce1"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classcom_1_1zrdds_1_1domain_1_1_domain_participant_factory.html">DomainParticipantFactory</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1zrdds_1_1simpleinterface_1_1_d_d_s_i_f.html#a087adf3b92e9f3942ae6f40bfc6c1ce1">init</a> (String qos_file_path, String qos_name)</td></tr>
<tr class="memdesc:a087adf3b92e9f3942ae6f40bfc6c1ce1"><td class="mdescLeft">&#160;</td><td class="mdescRight">以指定配置初始化DDS中间件，只在整个程序初始化时调用一次即可。  <a href="#a087adf3b92e9f3942ae6f40bfc6c1ce1">更多...</a><br /></td></tr>
<tr class="separator:a087adf3b92e9f3942ae6f40bfc6c1ce1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad01b6cc112a6a89995a1e1c4624f5ed1"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="interfacecom_1_1zrdds_1_1domain_1_1_domain_participant.html">DomainParticipant</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1zrdds_1_1simpleinterface_1_1_d_d_s_i_f.html#ad01b6cc112a6a89995a1e1c4624f5ed1">create_dp</a> (int domainId, String qos_name)</td></tr>
<tr class="memdesc:ad01b6cc112a6a89995a1e1c4624f5ed1"><td class="mdescLeft">&#160;</td><td class="mdescRight">DDS创建域参与者，并指明域号与QoS配置名称，同一个域号可能有多个域参与者， 需要为使用不同底层传输协议的主题创建不同的域参与者，即通常SRIO、UDP、TCP的域参与者各一个。  <a href="#ad01b6cc112a6a89995a1e1c4624f5ed1">更多...</a><br /></td></tr>
<tr class="separator:ad01b6cc112a6a89995a1e1c4624f5ed1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac6751cda204ad3877582b9fc9239eca6"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="interfacecom_1_1zrdds_1_1publication_1_1_data_writer.html">DataWriter</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1zrdds_1_1simpleinterface_1_1_d_d_s_i_f.html#ac6751cda204ad3877582b9fc9239eca6">pub_topic</a> (<a class="el" href="interfacecom_1_1zrdds_1_1domain_1_1_domain_participant.html">DomainParticipant</a> self, String topic_name, <a class="el" href="classcom_1_1zrdds_1_1topic_1_1_type_support.html">TypeSupport</a> type_support, String qos_name, <a class="el" href="interfacecom_1_1zrdds_1_1publication_1_1_data_writer_listener.html">DataWriterListener</a> dw_listener)</td></tr>
<tr class="memdesc:ac6751cda204ad3877582b9fc9239eca6"><td class="mdescLeft">&#160;</td><td class="mdescRight">发布主题，指定域参与者、主题名、类型名、QoS配置名称以及监听器。  <a href="#ac6751cda204ad3877582b9fc9239eca6">更多...</a><br /></td></tr>
<tr class="separator:ac6751cda204ad3877582b9fc9239eca6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa44f08d79797cc50d6dc868bb9e40c6c"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_return_code__t.html">ReturnCode_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1zrdds_1_1simpleinterface_1_1_d_d_s_i_f.html#aa44f08d79797cc50d6dc868bb9e40c6c">unpub_topic</a> (<a class="el" href="interfacecom_1_1zrdds_1_1publication_1_1_data_writer.html">DataWriter</a> writer)</td></tr>
<tr class="memdesc:aa44f08d79797cc50d6dc868bb9e40c6c"><td class="mdescLeft">&#160;</td><td class="mdescRight">指明数据写者指针取消发布。  <a href="#aa44f08d79797cc50d6dc868bb9e40c6c">更多...</a><br /></td></tr>
<tr class="separator:aa44f08d79797cc50d6dc868bb9e40c6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a86536fbeb871e33e58908e6c81ad8b68"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_return_code__t.html">ReturnCode_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1zrdds_1_1simpleinterface_1_1_d_d_s_i_f.html#a86536fbeb871e33e58908e6c81ad8b68">unpub_topic_w_topic_name</a> (int domainId, String topic_name)</td></tr>
<tr class="memdesc:a86536fbeb871e33e58908e6c81ad8b68"><td class="mdescLeft">&#160;</td><td class="mdescRight">通过域以及主题名称取消发布，如果域内存在多个主题名相同的发布者将删除所有同名主题发布。 该接口仅在指定域内有且仅有一个域参与者条件下使用；  <a href="#a86536fbeb871e33e58908e6c81ad8b68">更多...</a><br /></td></tr>
<tr class="separator:a86536fbeb871e33e58908e6c81ad8b68"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a690966aec0d5e72d8e5490df67ef0c85"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="interfacecom_1_1zrdds_1_1subscription_1_1_data_reader.html">DataReader</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1zrdds_1_1simpleinterface_1_1_d_d_s_i_f.html#a690966aec0d5e72d8e5490df67ef0c85">sub_topic</a> (<a class="el" href="interfacecom_1_1zrdds_1_1domain_1_1_domain_participant.html">DomainParticipant</a> self, String topic_name, <a class="el" href="classcom_1_1zrdds_1_1topic_1_1_type_support.html">TypeSupport</a> type_support, String qos_name, <a class="el" href="interfacecom_1_1zrdds_1_1subscription_1_1_data_reader_listener.html">DataReaderListener</a> dr_listener)</td></tr>
<tr class="memdesc:a690966aec0d5e72d8e5490df67ef0c85"><td class="mdescLeft">&#160;</td><td class="mdescRight">订阅主题，指定域参与者、主题名、类型名以及QoS配置名称。  <a href="#a690966aec0d5e72d8e5490df67ef0c85">更多...</a><br /></td></tr>
<tr class="separator:a690966aec0d5e72d8e5490df67ef0c85"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92274c0f48f87f021cab2b35726fdc65"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_return_code__t.html">ReturnCode_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1zrdds_1_1simpleinterface_1_1_d_d_s_i_f.html#a92274c0f48f87f021cab2b35726fdc65">unsub_topic</a> (<a class="el" href="interfacecom_1_1zrdds_1_1subscription_1_1_data_reader.html">DataReader</a> reader)</td></tr>
<tr class="memdesc:a92274c0f48f87f021cab2b35726fdc65"><td class="mdescLeft">&#160;</td><td class="mdescRight">指明数据读者指针取消订阅。  <a href="#a92274c0f48f87f021cab2b35726fdc65">更多...</a><br /></td></tr>
<tr class="separator:a92274c0f48f87f021cab2b35726fdc65"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a436494fc81867d8448e29d06d31a57e3"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_return_code__t.html">ReturnCode_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1zrdds_1_1simpleinterface_1_1_d_d_s_i_f.html#a436494fc81867d8448e29d06d31a57e3">unsub_topic_w_topic_name</a> (int domainId, String topic_name)</td></tr>
<tr class="memdesc:a436494fc81867d8448e29d06d31a57e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">通过域以及主题名称取消订阅，如果域内存在多个主题名相同的订阅者将删除所有同名主题订阅。 该接口仅在指定域内有且仅有一个域参与者条件下使用；  <a href="#a436494fc81867d8448e29d06d31a57e3">更多...</a><br /></td></tr>
<tr class="separator:a436494fc81867d8448e29d06d31a57e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a526171c5ef8a11035c6f6f7928ee01c4"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_return_code__t.html">ReturnCode_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1zrdds_1_1simpleinterface_1_1_d_d_s_i_f.html#a526171c5ef8a11035c6f6f7928ee01c4">Finalize</a> ()</td></tr>
<tr class="memdesc:a526171c5ef8a11035c6f6f7928ee01c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">清理资源。  <a href="#a526171c5ef8a11035c6f6f7928ee01c4">更多...</a><br /></td></tr>
<tr class="separator:a526171c5ef8a11035c6f6f7928ee01c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8ec2801cdb29654cd06fc5313794d152"><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1zrdds_1_1simpleinterface_1_1_d_d_s_i_f.html#a8ec2801cdb29654cd06fc5313794d152">BytesWrapper</a> (<a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_bytes.html">Bytes</a> self, byte[] buffer, int length)</td></tr>
<tr class="memdesc:a8ec2801cdb29654cd06fc5313794d152"><td class="mdescLeft">&#160;</td><td class="mdescRight">用户缓冲区包装成DDS_Bytes类型（非零拷贝缓冲区数据类型），该接口不分配空间，无需对应的回收函数。.  <a href="#a8ec2801cdb29654cd06fc5313794d152">更多...</a><br /></td></tr>
<tr class="separator:a8ec2801cdb29654cd06fc5313794d152"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a51c385ddbea75d284ab6954fadb33ced"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_return_code__t.html">ReturnCode_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classcom_1_1zrdds_1_1simpleinterface_1_1_d_d_s_i_f.html#a51c385ddbea75d284ab6954fadb33ced">BytesWrite</a> (int domainId, String topic_name, byte[] content, int length)</td></tr>
<tr class="memdesc:a51c385ddbea75d284ab6954fadb33ced"><td class="mdescLeft">&#160;</td><td class="mdescRight">向指定的域发送指定主题的非零拷贝Bytes数据。使用该接口的前提：  <a href="#a51c385ddbea75d284ab6954fadb33ced">更多...</a><br /></td></tr>
<tr class="separator:a51c385ddbea75d284ab6954fadb33ced"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>DDS的Java简化接口，所有方法为静态方法。 </p>
</div><h2 class="groupheader">成员函数说明</h2>
<a class="anchor" id="a8ec2801cdb29654cd06fc5313794d152"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static Long <a class="el" href="classcom_1_1zrdds_1_1simpleinterface_1_1_d_d_s_i_f.html">DDSIF</a> BytesWrapper </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_bytes.html">Bytes</a>&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">byte[]&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>length</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>用户缓冲区包装成DDS_Bytes类型（非零拷贝缓冲区数据类型），该接口不分配空间，无需对应的回收函数。. </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">self</td><td>指明包装的目标。 </td></tr>
    <tr><td class="paramname">buffer</td><td>用户提供空间。 </td></tr>
    <tr><td class="paramname">length</td><td>空间长度。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>0表示成功，否则表示失败。 </dd></dl>

</div>
</div>
<a class="anchor" id="a51c385ddbea75d284ab6954fadb33ced"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_return_code__t.html">ReturnCode_t</a> <a class="el" href="classcom_1_1zrdds_1_1simpleinterface_1_1_d_d_s_i_f.html">DDSIF</a> BytesWrite </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>domainId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>topic_name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">byte[]&#160;</td>
          <td class="paramname"><em>content</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>length</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>向指定的域发送指定主题的非零拷贝Bytes数据。使用该接口的前提： </p>
<ul>
<li>指定的域内有且仅有一个域参与者；</li>
<li>指定的域内有且仅有一个与指定主题关联的发布者；</li>
<li>指定的主题关联的数据类型为Bytes数据类型； 如果不满足以上条件，请使用 BytesDataWriter_write 接口指定发布者发送数据。.</li>
</ul>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">domainId</td><td>指明域号。 </td></tr>
    <tr><td class="paramname">topic_name</td><td>指明主题名称。 </td></tr>
    <tr><td class="paramname">content</td><td>发送内容缓冲区。 </td></tr>
    <tr><td class="paramname">length</td><td>缓冲区长度。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>#RETCODE_OK 表示发送成功， 其他表示失败。 </dd></dl>

</div>
</div>
<a class="anchor" id="ad01b6cc112a6a89995a1e1c4624f5ed1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="interfacecom_1_1zrdds_1_1domain_1_1_domain_participant.html">DomainParticipant</a> <a class="el" href="classcom_1_1zrdds_1_1simpleinterface_1_1_d_d_s_i_f.html">DDSIF</a> create_dp </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>domainId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>qos_name</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>DDS创建域参与者，并指明域号与QoS配置名称，同一个域号可能有多个域参与者， 需要为使用不同底层传输协议的主题创建不同的域参与者，即通常SRIO、UDP、TCP的域参与者各一个。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">domainId</td><td>指明域号，域号范围0-232. </td></tr>
    <tr><td class="paramname">qos_name</td><td>指明QoS配置文件中域参与者QoS配置名称，允许为null，表明使用配置文件中名称为default的配置。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>null表示失败，否则返回域参与者的指针，该指针用于后续创建发布者以及订阅者。 </dd></dl>

</div>
</div>
<a class="anchor" id="a526171c5ef8a11035c6f6f7928ee01c4"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_return_code__t.html">ReturnCode_t</a> <a class="el" href="classcom_1_1zrdds_1_1simpleinterface_1_1_d_d_s_i_f.html">DDSIF</a> Finalize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>清理资源。 </p>
<dl class="section return"><dt>返回</dt><dd>RETCODE_OK表示成功，否则表示部分资源清理失败。 </dd></dl>

</div>
</div>
<a class="anchor" id="a087adf3b92e9f3942ae6f40bfc6c1ce1"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classcom_1_1zrdds_1_1domain_1_1_domain_participant_factory.html">DomainParticipantFactory</a> init </td>
          <td>(</td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>qos_file_path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>qos_name</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>以指定配置初始化DDS中间件，只在整个程序初始化时调用一次即可。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">qos_file_path</td><td>QoS配置文件的路径，可以是绝对路径，也可以是程序运行目录的相对路径， 为NULL时，默认使用运行目录的 ZRDDS_QOS_PROFILES.xml 配置文件。</td></tr>
    <tr><td class="paramname">qos_name</td><td>QoS配置文件中工厂QoS配置名称，DDS将以 default_lib::default_profile::qosName 代表的QoS初始化DDS域厂， 允许为NULL，表明使用配置文件中名称为default的配置。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>null表示失败，否则返回DDS域工厂单例。 </dd></dl>
<dl><dt><b>示例: </b></dt><dd><a class="el" href="simpleinterface_2_simple_interface_zero_copy_pub_8java-example.html#a0">simpleinterface/SimpleInterfaceZeroCopyPub.java</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="ac6751cda204ad3877582b9fc9239eca6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="interfacecom_1_1zrdds_1_1publication_1_1_data_writer.html">DataWriter</a> <a class="el" href="classcom_1_1zrdds_1_1simpleinterface_1_1_d_d_s_i_f.html">DDSIF</a> pub_topic </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="interfacecom_1_1zrdds_1_1domain_1_1_domain_participant.html">DomainParticipant</a>&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>topicName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classcom_1_1zrdds_1_1topic_1_1_type_support.html">TypeSupport</a>&#160;</td>
          <td class="paramname"><em>type_support</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>qos_name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="interfacecom_1_1zrdds_1_1publication_1_1_data_writer_listener.html">DataWriterListener</a>&#160;</td>
          <td class="paramname"><em>dw_listener</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>发布主题，指定域参与者、主题名、类型名、QoS配置名称以及监听器。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">self</td><td>指明域参与者。 </td></tr>
    <tr><td class="paramname">topic_name</td><td>主题名称。 </td></tr>
    <tr><td class="paramname">type_support</td><td>类型支持对象指明关联的数据类型，规则为： 类型名称+TypeSupport.get_instance(), 如果为零拷贝数据类型则传输 &amp;ZeroCopyBytesTypeSupport_instance， 内置非零拷贝传入 &amp;BytesTypeSupport.get_instance()，IDL文件自动生成的传入 &amp; 类型名称TypeSupport.get_instance对象。 </td></tr>
    <tr><td class="paramname">qos_name</td><td>指明QoS配置文件中数据写者QoS配置名称，允许为null，表明使用配置文件中名称为default的配置。 </td></tr>
    <tr><td class="paramname">dw_listener</td><td>发布者的监听器，用于扩展，填null即可。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>null表示失败，否则返回数据写者指针（用于唯一标识创建好的发布者）。 </dd></dl>

</div>
</div>
<a class="anchor" id="a690966aec0d5e72d8e5490df67ef0c85"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="interfacecom_1_1zrdds_1_1subscription_1_1_data_reader.html">DataReader</a> *<a class="el" href="classcom_1_1zrdds_1_1simpleinterface_1_1_d_d_s_i_f.html">DDSIF</a> sub_topic </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="interfacecom_1_1zrdds_1_1domain_1_1_domain_participant.html">DomainParticipant</a>&#160;</td>
          <td class="paramname"><em>self</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>topic_name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classcom_1_1zrdds_1_1topic_1_1_type_support.html">TypeSupport</a>&#160;</td>
          <td class="paramname"><em>type_support</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>qos_name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="interfacecom_1_1zrdds_1_1subscription_1_1_data_reader_listener.html">DataReaderListener</a>&#160;</td>
          <td class="paramname"><em>dr_listener</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>订阅主题，指定域参与者、主题名、类型名以及QoS配置名称。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">self</td><td>指明域参与者。 </td></tr>
    <tr><td class="paramname">topic_name</td><td>主题名称。 </td></tr>
    <tr><td class="paramname">type_support</td><td>类型支持对象指明关联的数据类型，规则为： 类型名称+TypeSupport.get_instance(), 如果为零拷贝数据类型则传输 &amp;ZeroCopyBytesTypeSupport_instance， 内置非零拷贝传入 &amp;BytesTypeSupport.get_instance()，IDL文件自动生成的传入 &amp; 类型名称TypeSupport.get_instance对象。 </td></tr>
    <tr><td class="paramname">qos_name</td><td>指明QoS配置文件中数据写者QoS配置名称，允许为NULL，表明使用配置文件中名称为default的配置。 </td></tr>
    <tr><td class="paramname">dr_listener</td><td>订阅者的监听器，用于扩展，填NULL即可。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>NULL表示失败，否则返回数据读者指针（用于唯一标识创建好的订阅者）。 </dd></dl>

</div>
</div>
<a class="anchor" id="aa44f08d79797cc50d6dc868bb9e40c6c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_return_code__t.html">ReturnCode_t</a> <a class="el" href="classcom_1_1zrdds_1_1simpleinterface_1_1_d_d_s_i_f.html">DDSIF</a> unpub_topic </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="interfacecom_1_1zrdds_1_1publication_1_1_data_writer.html">DataWriter</a>&#160;</td>
          <td class="paramname"><em>writer</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>指明数据写者指针取消发布。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">writer</td><td>指明数据写者指针。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>#RETCODE_OK 表示取消成功，其他表示失败； </dd></dl>

</div>
</div>
<a class="anchor" id="a86536fbeb871e33e58908e6c81ad8b68"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_return_code__t.html">ReturnCode_t</a> <a class="el" href="classcom_1_1zrdds_1_1simpleinterface_1_1_d_d_s_i_f.html">DDSIF</a> unpub_topic_w_topic_name </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>domainId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>topic_name</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>通过域以及主题名称取消发布，如果域内存在多个主题名相同的发布者将删除所有同名主题发布。 该接口仅在指定域内有且仅有一个域参与者条件下使用； </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">domainId</td><td>指明域号。 </td></tr>
    <tr><td class="paramname">topic_name</td><td>指明主题名称。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>#RETCODE_OK 表示取消成功，其他表示失败； </dd></dl>

</div>
</div>
<a class="anchor" id="a92274c0f48f87f021cab2b35726fdc65"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_return_code__t.html">ReturnCode_t</a> <a class="el" href="classcom_1_1zrdds_1_1simpleinterface_1_1_d_d_s_i_f.html">DDSIF</a> unsub_topic </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="interfacecom_1_1zrdds_1_1subscription_1_1_data_reader.html">DataReader</a>&#160;</td>
          <td class="paramname"><em>reader</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>指明数据读者指针取消订阅。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">reader</td><td>指明数据读者指针。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>#RETCODE_OK 表示取消成功，其他表示失败； </dd></dl>

</div>
</div>
<a class="anchor" id="a436494fc81867d8448e29d06d31a57e3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="classcom_1_1zrdds_1_1infrastructure_1_1_return_code__t.html">ReturnCode_t</a> <a class="el" href="classcom_1_1zrdds_1_1simpleinterface_1_1_d_d_s_i_f.html">DDSIF</a> unsub_topic_w_topic_name </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>domainId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">String&#160;</td>
          <td class="paramname"><em>topicName</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>通过域以及主题名称取消订阅，如果域内存在多个主题名相同的订阅者将删除所有同名主题订阅。 该接口仅在指定域内有且仅有一个域参与者条件下使用； </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">domainId</td><td>指明域号。 </td></tr>
    <tr><td class="paramname">topic_name</td><td>指明主题名称。</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>#RETCODE_OK 表示取消成功，其他表示失败； </dd></dl>

</div>
</div>
<hr/>该接口的文档由以下文件生成:<ul>
<li>DDSIF.java</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.10-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><b>com</b></li><li class="navelem"><b>zrdds</b></li><li class="navelem"><a class="el" href="namespacecom_1_1zrdds_1_1simpleinterface.html">simpleinterface</a></li><li class="navelem"><a class="el" href="classcom_1_1zrdds_1_1simpleinterface_1_1_d_d_s_i_f.html">DDSIF</a></li>
    <li class="footer">
      <a href="http://www.zrtechnology.com">&copy; Copyright (c) 2018 ZhenRong Technology, Inc. All rights reserved.</a>
    </li>
  </ul>
</div>
</body>
</html>
